package com.supermap.business.cloud.china;

import com.alibaba.dubbo.config.annotation.Reference;
import com.supermap.dataservice.util.JSONUtil;
import com.supermap.dubbo.api.cloud.china.StatisticsService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @author aqua
 * @description
 * @date 2018年12月12 下午 3:28
 * @email 1301584033@qq.com
 */
@Controller
@RequestMapping("/china/statistics")
public class StatisticsController {

    @Reference(timeout = 10000)
    private StatisticsService statisticsService;


    @GetMapping("/getAllTypeList")
    @ResponseBody
    public JSONUtil getAllTypeList(String areaCode,String cropId){
        return  statisticsService.getAllTypeList(areaCode, cropId);
    }
    /**
     *农情上传
     * */
    @GetMapping("/getAdvUploadByCropId")
    @ResponseBody
    public JSONUtil getAdvUploadByCropId(String cropId){
        return  statisticsService.getAdvUploadByCropId(cropId);
    }

    /**
     *产品统计 获取重庆产品统计数
     * */
    @GetMapping("/getProductCountSum")
    @ResponseBody
    public JSONUtil getProductCountSum(String areaCode){
        return  statisticsService.getProductCountSum(areaCode);
    }


    /**
     *注册农田
     * */
    @GetMapping("/getFarmLandDistribution")
    @ResponseBody
    public JSONUtil getFarmLandDistribution(String areaCode){
        return  statisticsService.getFarmLandDistribution(areaCode);
    }


    /**
     *服务对象
     * */
    @GetMapping("/getSerObjListByAreacode")
    @ResponseBody
    public JSONUtil getSerObjListByAreacode (String areaCode,String month,String cropId){
        return  statisticsService.getSerObjListByAreacode(areaCode,month,cropId);
    }

    /**
     *农情上传
     * */
    @GetMapping("/getAgrByareaCode")
    @ResponseBody
    public JSONUtil getAgrByareaCode (String areaCode){
        return  statisticsService.getAgrByareaCode(areaCode);
    }



}
